package org.flowable.app.domain.editor;


import java.sql.Timestamp;
import java.util.Objects;

/**
 * A Flow.
 */
public class Flow {


    private Long id;

    private String processInstId;

    private Integer state;

    private String currentStep;

    private String flowTemp;

    private String flowTempId;

    private String flowTempKey;

    private String startForm;

    private String createUserId;

    private String createUserName;

    private Timestamp startTime;

    private Timestamp createTime;

    private Timestamp endTime;

    private String source;

    private String deploymentKey;

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public String getDeploymentKey() {
        return deploymentKey;
    }

    public void setDeploymentKey(String deploymentKey) {
        this.deploymentKey = deploymentKey;
    }

    public String getCurrentStep() {
        return currentStep;
    }

    public void setCurrentStep(String currentStep) {
        this.currentStep = currentStep;
    }

    public String getFlowTemp() {
        return flowTemp;
    }

    public void setFlowTemp(String flowTemp) {
        this.flowTemp = flowTemp;
    }

    public String getFlowTempId() {
        return flowTempId;
    }

    public void setFlowTempId(String flowTempId) {
        this.flowTempId = flowTempId;
    }

    public String getFlowTempKey() {
        return flowTempKey;
    }

    public void setFlowTempKey(String flowTempKey) {
        this.flowTempKey = flowTempKey;
    }

    public String getStartForm() {
        return startForm;
    }

    public void setStartForm(String startForm) {
        this.startForm = startForm;
    }

    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }

    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    public Timestamp getStartTime() {
        return startTime;
    }

    public void setStartTime(Timestamp startTime) {
        this.startTime = startTime;
    }

    public Timestamp getEndTime() {
        return endTime;
    }

    public void setEndTime(Timestamp endTime) {
        this.endTime = endTime;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getProcessInstId() {
        return processInstId;
    }

    public Flow processInstId(String processInstId) {
        this.processInstId = processInstId;
        return this;
    }

    public void setProcessInstId(String processInstId) {
        this.processInstId = processInstId;
    }

    public Integer getState() {
        return state;
    }

    public Flow state(Integer state) {
        this.state = state;
        return this;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Flow flow = (Flow) o;
        if (flow.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), flow.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "Flow{" +
            "id=" + getId() +
            ", processInstId='" + getProcessInstId() + "'" +
            ", state='" + getState() + "'" +
            "}";
    }
}
